package com.itic.im.core.model;

import java.io.Serializable;
import java.util.Date;

public class ImMsg implements Serializable {
    private Long id;

    /**
     * 群组类型， 1：群聊    2：1v1
     *
     * @mbg.generated
     */
    private String chatType;

    /**
     * 消息发送方
     *
     * @mbg.generated
     */
    private String sendUid;

    /**
     * 消息接收方
     *
     * @mbg.generated
     */
    private String receiveUid;

    /**
     * 群组ID
     *
     * @mbg.generated
     */
    private String groupId;

    /**
     * 消息类型 1：文本  2：图片  3：视频  4：文件
     *
     * @mbg.generated
     */
    private String msgType;

    /**
     * 是否撤回 1：是  0：否
     *
     * @mbg.generated
     */
    private String ifWithdraw;

    /**
     * 消息分区日期
     *
     * @mbg.generated
     */
    private String msgShardingDate;

    /**
     * 发送时间
     *
     * @mbg.generated
     */
    private Date time;

    /**
     * 消息时序
     *
     * @mbg.generated
     */
    private Integer msgSeq;

    /**
     * 文件名
     *
     * @mbg.generated
     */
    private String fileName;

    /**
     * 文件后缀
     *
     * @mbg.generated
     */
    private String fileType;

    /**
     * 文件类型
     *
     * @mbg.generated
     */
    private String fileSize;

    /**
     * 文件大小
     *
     * @mbg.generated
     */
    private String fileExtension;

    /**
     * 文件最后修改时间
     *
     * @mbg.generated
     */
    private String fileLastmodified;

    /**
     * 文件最后修改日期
     *
     * @mbg.generated
     */
    private Date fileLastmodifieddate;

    /**
     * 引用消息ID
     *
     * @mbg.generated
     */
    private Long referenceMsgId;

    /**
     * 扩展字段1
     *
     * @mbg.generated
     */
    private String ext1;

    /**
     * 扩展字段2
     *
     * @mbg.generated
     */
    private String ext2;

    /**
     * 扩展字段3
     *
     * @mbg.generated
     */
    private String ext3;

    /**
     * 扩展字段4
     *
     * @mbg.generated
     */
    private String ext4;

    /**
     * 扩展字段5
     *
     * @mbg.generated
     */
    private String ext5;

    /**
     * 扩展字段6
     *
     * @mbg.generated
     */
    private String ext6;

    /**
     * 消息内容
     *
     * @mbg.generated
     */
    private String msg;

    /**
     * 消息内容扩展
     *
     * @mbg.generated
     */
    private String msgExt;

    String isEffective;
    Date createTime;
    Date updateTime;
    String orgCode;
    String createUser;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getChatType() {
        return chatType;
    }

    public void setChatType(String chatType) {
        this.chatType = chatType;
    }

    public String getSendUid() {
        return sendUid;
    }

    public void setSendUid(String sendUid) {
        this.sendUid = sendUid;
    }

    public String getReceiveUid() {
        return receiveUid;
    }

    public void setReceiveUid(String receiveUid) {
        this.receiveUid = receiveUid;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getMsgType() {
        return msgType;
    }

    public void setMsgType(String msgType) {
        this.msgType = msgType;
    }

    public String getIfWithdraw() {
        return ifWithdraw;
    }

    public void setIfWithdraw(String ifWithdraw) {
        this.ifWithdraw = ifWithdraw;
    }

    public String getMsgShardingDate() {
        return msgShardingDate;
    }

    public void setMsgShardingDate(String msgShardingDate) {
        this.msgShardingDate = msgShardingDate;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Integer getMsgSeq() {
        return msgSeq;
    }

    public void setMsgSeq(Integer msgSeq) {
        this.msgSeq = msgSeq;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public String getFileSize() {
        return fileSize;
    }

    public void setFileSize(String fileSize) {
        this.fileSize = fileSize;
    }

    public String getFileExtension() {
        return fileExtension;
    }

    public void setFileExtension(String fileExtension) {
        this.fileExtension = fileExtension;
    }

    public String getFileLastmodified() {
        return fileLastmodified;
    }

    public void setFileLastmodified(String fileLastmodified) {
        this.fileLastmodified = fileLastmodified;
    }

    public Date getFileLastmodifieddate() {
        return fileLastmodifieddate;
    }

    public void setFileLastmodifieddate(Date fileLastmodifieddate) {
        this.fileLastmodifieddate = fileLastmodifieddate;
    }

    public Long getReferenceMsgId() {
        return referenceMsgId;
    }

    public void setReferenceMsgId(Long referenceMsgId) {
        this.referenceMsgId = referenceMsgId;
    }

    public String getExt1() {
        return ext1;
    }

    public void setExt1(String ext1) {
        this.ext1 = ext1;
    }

    public String getExt2() {
        return ext2;
    }

    public void setExt2(String ext2) {
        this.ext2 = ext2;
    }

    public String getExt3() {
        return ext3;
    }

    public void setExt3(String ext3) {
        this.ext3 = ext3;
    }

    public String getExt4() {
        return ext4;
    }

    public void setExt4(String ext4) {
        this.ext4 = ext4;
    }

    public String getExt5() {
        return ext5;
    }

    public void setExt5(String ext5) {
        this.ext5 = ext5;
    }

    public String getExt6() {
        return ext6;
    }

    public void setExt6(String ext6) {
        this.ext6 = ext6;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getMsgExt() {
        return msgExt;
    }

    public void setMsgExt(String msgExt) {
        this.msgExt = msgExt;
    }
    public String getIsEffective() {
        return isEffective;
    }

    public void setIsEffective(String isEffective) {
        this.isEffective = isEffective;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getOrgCode() {
        return orgCode;
    }

    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", chatType=").append(chatType);
        sb.append(", sendUid=").append(sendUid);
        sb.append(", receiveUid=").append(receiveUid);
        sb.append(", groupId=").append(groupId);
        sb.append(", msgType=").append(msgType);
        sb.append(", ifWithdraw=").append(ifWithdraw);
        sb.append(", msgShardingDate=").append(msgShardingDate);
        sb.append(", time=").append(time);
        sb.append(", msgSeq=").append(msgSeq);
        sb.append(", fileName=").append(fileName);
        sb.append(", fileType=").append(fileType);
        sb.append(", fileSize=").append(fileSize);
        sb.append(", fileExtension=").append(fileExtension);
        sb.append(", fileLastmodified=").append(fileLastmodified);
        sb.append(", fileLastmodifieddate=").append(fileLastmodifieddate);
        sb.append(", referenceMsgId=").append(referenceMsgId);
        sb.append(", ext1=").append(ext1);
        sb.append(", ext2=").append(ext2);
        sb.append(", ext3=").append(ext3);
        sb.append(", ext4=").append(ext4);
        sb.append(", ext5=").append(ext5);
        sb.append(", ext6=").append(ext6);
        sb.append(", msg=").append(msg);
        sb.append(", msgExt=").append(msgExt);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ImMsg other = (ImMsg) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getChatType() == null ? other.getChatType() == null : this.getChatType().equals(other.getChatType()))
            && (this.getSendUid() == null ? other.getSendUid() == null : this.getSendUid().equals(other.getSendUid()))
            && (this.getReceiveUid() == null ? other.getReceiveUid() == null : this.getReceiveUid().equals(other.getReceiveUid()))
            && (this.getGroupId() == null ? other.getGroupId() == null : this.getGroupId().equals(other.getGroupId()))
            && (this.getMsgType() == null ? other.getMsgType() == null : this.getMsgType().equals(other.getMsgType()))
            && (this.getIfWithdraw() == null ? other.getIfWithdraw() == null : this.getIfWithdraw().equals(other.getIfWithdraw()))
            && (this.getMsgShardingDate() == null ? other.getMsgShardingDate() == null : this.getMsgShardingDate().equals(other.getMsgShardingDate()))
            && (this.getTime() == null ? other.getTime() == null : this.getTime().equals(other.getTime()))
            && (this.getMsgSeq() == null ? other.getMsgSeq() == null : this.getMsgSeq().equals(other.getMsgSeq()))
            && (this.getFileName() == null ? other.getFileName() == null : this.getFileName().equals(other.getFileName()))
            && (this.getFileType() == null ? other.getFileType() == null : this.getFileType().equals(other.getFileType()))
            && (this.getFileSize() == null ? other.getFileSize() == null : this.getFileSize().equals(other.getFileSize()))
            && (this.getFileExtension() == null ? other.getFileExtension() == null : this.getFileExtension().equals(other.getFileExtension()))
            && (this.getFileLastmodified() == null ? other.getFileLastmodified() == null : this.getFileLastmodified().equals(other.getFileLastmodified()))
            && (this.getFileLastmodifieddate() == null ? other.getFileLastmodifieddate() == null : this.getFileLastmodifieddate().equals(other.getFileLastmodifieddate()))
            && (this.getReferenceMsgId() == null ? other.getReferenceMsgId() == null : this.getReferenceMsgId().equals(other.getReferenceMsgId()))
            && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
            && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
            && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()))
            && (this.getExt4() == null ? other.getExt4() == null : this.getExt4().equals(other.getExt4()))
            && (this.getExt5() == null ? other.getExt5() == null : this.getExt5().equals(other.getExt5()))
            && (this.getExt6() == null ? other.getExt6() == null : this.getExt6().equals(other.getExt6()))
            && (this.getIsEffective() == null ? other.getIsEffective() == null : this.getIsEffective().equals(other.getIsEffective()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getOrgCode() == null ? other.getOrgCode() == null : this.getOrgCode().equals(other.getOrgCode()))
            && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
            && (this.getMsg() == null ? other.getMsg() == null : this.getMsg().equals(other.getMsg()))
            && (this.getMsgExt() == null ? other.getMsgExt() == null : this.getMsgExt().equals(other.getMsgExt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getChatType() == null) ? 0 : getChatType().hashCode());
        result = prime * result + ((getSendUid() == null) ? 0 : getSendUid().hashCode());
        result = prime * result + ((getReceiveUid() == null) ? 0 : getReceiveUid().hashCode());
        result = prime * result + ((getGroupId() == null) ? 0 : getGroupId().hashCode());
        result = prime * result + ((getMsgType() == null) ? 0 : getMsgType().hashCode());
        result = prime * result + ((getIfWithdraw() == null) ? 0 : getIfWithdraw().hashCode());
        result = prime * result + ((getMsgShardingDate() == null) ? 0 : getMsgShardingDate().hashCode());
        result = prime * result + ((getTime() == null) ? 0 : getTime().hashCode());
        result = prime * result + ((getMsgSeq() == null) ? 0 : getMsgSeq().hashCode());
        result = prime * result + ((getFileName() == null) ? 0 : getFileName().hashCode());
        result = prime * result + ((getFileType() == null) ? 0 : getFileType().hashCode());
        result = prime * result + ((getFileSize() == null) ? 0 : getFileSize().hashCode());
        result = prime * result + ((getFileExtension() == null) ? 0 : getFileExtension().hashCode());
        result = prime * result + ((getFileLastmodified() == null) ? 0 : getFileLastmodified().hashCode());
        result = prime * result + ((getFileLastmodifieddate() == null) ? 0 : getFileLastmodifieddate().hashCode());
        result = prime * result + ((getReferenceMsgId() == null) ? 0 : getReferenceMsgId().hashCode());
        result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
        result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
        result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
        result = prime * result + ((getExt4() == null) ? 0 : getExt4().hashCode());
        result = prime * result + ((getExt5() == null) ? 0 : getExt5().hashCode());
        result = prime * result + ((getExt6() == null) ? 0 : getExt6().hashCode());
        result = prime * result + ((getIsEffective() == null) ? 0 : getIsEffective().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getOrgCode() == null) ? 0 : getOrgCode().hashCode());
        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
        result = prime * result + ((getMsg() == null) ? 0 : getMsg().hashCode());
        result = prime * result + ((getMsgExt() == null) ? 0 : getMsgExt().hashCode());
        return result;
    }
}
